<ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui"
        xmlns:jsf="http://xmlns.jcp.org/jsf"
        xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
        xmlns:pe="http://primefaces.org/ui/extensions"
        xmlns:ezcomp="http://xmlns.jcp.org/jsf/composite/ezcomp">
    <script>
        $(function () {
            var Height = (document.documentElement.clientHeight || document.body.clientHeight) + 175;
            document.getElementById("maintab:feyongdanList:fydList").style.height = Height - 400 + "px";
        });
        window.onresize = function () {
            var Height = (document.documentElement.clientHeight || document.body.clientHeight) + 175;
            document.getElementById("maintab:feyongdanList:fydList").style.height = Height - 800 + "px";
        };
    </script>
    <h:form id="feyongdanList">
        #{kzbd.bb('fydList').mc.index()}
        <p:panel id="fydslist" style="height: 40px;font-weight: bolder;font-size: 20px;text-align: center ">
            <span>费用单列表</span>
        </p:panel>
        <p:menubar id="menu">
            <f:facet name="options">
                <p:commandButton value="查询" icon="fa fa-search" process="@this" update="msg,maintab:feyongdanList:fydList"
                                 action="#{kzbd.bb('fydList').mc.select()}"/>
                <p:commandButton value="修改" icon="fa fa-edit" process="@this" update="msg,maintab:feyongdanList:fydList"
                                 action="#{kzbd.bb('fydList').mc.update()}"/>
                <p:commandButton value="删除" icon="fa fa-ban" process="@this" update="msg,maintab:feyongdanList:fydList"
                                 action="#{kzbd.bb('fydList').mc.delete()}"/>

            </f:facet>
        </p:menubar>
        <p:panel id="fydDemoLists" style="height: 640px;position: relative;overflow: hidden">
            <!-- 数据表 -->
            <p:dataTable emptyMessage="无记录" id="fydList" var="li" rowIndexVar="lia" showGridlines="true"
                         stripedRows="true" resizableColumns="true"  selectionMode="single" selection="#{kzbd.bb('fydList').mc.lbselectrow}"
                         value="#{kzbd.bb('fydList').mc.datalist}" reflow="true" styleClass="products-table"
                         scrollable="true" scrollHeight="95%"
                         rowKey="#{li.id}" paginator="true" rows="100" style="visibility: visible !important"
                         paginatorPosition="bottom" rowsPerPageTemplate="10,20,50,100">
                <!-- 添加复选框 -->
                <p:column selectionMode="multiple" exportable="false" style="box-sizing: content-box;width:15px"/>
                <p:column headerText="单据编号" style="width: 70px;text-align:center" sortBy="#{li.invoice_number}">
                    <h:outputText value="#{li.invoice_number}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="提报时间" style="width: 100px;text-align:center" sortBy="#{li.report_time}">
                    <h:outputText value="#{li.report_time}" style="display: block;text-align: left"/>
                </p:column>
                <p:column headerText="提报人" style="width: 70px;text-align:center" sortBy="#{li.reporter}">
                    <h:outputText value="#{li.reporter}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="提报部门" style="width: 70px;text-align:center" sortBy="#{li.department}">
                    <h:outputText value="#{li.department}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="合同编号" style="width: 70px;text-align:center" sortBy="#{li.contract_number}">
                    <h:outputText value="#{li.contract_number}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="客户名称" style="width: 70px;text-align:center" sortBy="#{li.client_name}">
                    <h:outputText value="#{li.client_name}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="费用总金额" style="width: 70px;text-align:center" sortBy="#{li.money_all}">
                    <h:outputText value="#{li.money_all}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="报销类型" style="width: 70px;text-align:center" sortBy="#{li.invoice_type}">
                    <h:outputText value="#{li.invoice_type}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="用途" style="width: 70px;text-align:center" sortBy="#{li.yongtu}">
                    <h:outputText value="#{li.yongtu}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="审核人" style="width: 70px;text-align:center" sortBy="#{li.auditor}">
                    <h:outputText value="#{li.auditor}" style="display: block;text-align: center"/>
                </p:column>
                <p:column headerText="审核时间" style="width: 70px;text-align:center" sortBy="#{li.audit_time}">
                    <h:outputText value="#{li.audit_time}" style="display: block;text-align: center"/>
                </p:column>
            </p:dataTable>
        </p:panel>
    </h:form>
</ui:composition>